<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>登录页面</title>
    <script src="/js/jquery-3.4.1.js"></script>
</head>
<body>
<h1>AUthClient</h1>
<button type="button" onclick="login()">登录</button>
<button type="button" onclick="toAuthCenter()">授权中心</button>
<script>
    function login(){
        $.ajax({
            url:"http://localhost:18091/client/login",
            type:"POST",
            data:{"username":"","password":""},
            success:function (result) {
                alert(result);
            }
        });
    }
    function toAuthCenter(){
        window.location.href = "http://localhost:18092/oauth/authorize?response_type=code&client_id=free-web&redirect_uri=http://localhost:18091/client/fetchCode";
    }
</script>
</body>
</html>